﻿<UserControl
    x:Class="CodeShow.CS.GridLayoutDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeShow.CS"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="400"
    Width="400"
    RequestedTheme="Light">
    <!--BeginCutPaste-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="50" />
            <RowDefinition Height="5*" />
            <RowDefinition Height="2*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="0.5*" />
        </Grid.ColumnDefinitions>
        <Grid Background="Purple" />
        <Grid Grid.Column="2" 
              Grid.ColumnSpan="2" 
              Background="Black">
            <Rectangle Height="100" Width="50">
                <Rectangle.Fill>
                    <SolidColorBrush 
                        Color="Pink" 
                        Opacity=".8" />
                </Rectangle.Fill>
            </Rectangle>
        </Grid>
        <Grid Grid.Column="0" 
              Grid.Row="1" 
              Grid.RowSpan="2" 
              Background="Red">
        </Grid>
        <Grid Grid.Column="2" 
              Grid.Row="1" 
              Grid.ColumnSpan="2" 
              Background="Blue">
        </Grid>
        <Grid Grid.Column="2" 
              Grid.Row="2" 
              Grid.ColumnSpan="2" 
              Grid.RowSpan="2" 
              Background="Green">
        </Grid>
        <Grid Grid.Column="1" 
              Grid.RowSpan="4" 
              Background="Yellow">
        </Grid>
        <Grid Grid.Row="3" 
              Background="Aqua">
        </Grid>
    </Grid>
    <!--EndCutPaste-->
</UserControl>
